<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<%@ taglib prefix="his_fns" uri="/WEB-INF/tlds/his_fns.tld" %>
<script type="text/javascript">
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
</script>
<div class="app">
    <section class="layout">
        <section class="main-content col-lg-12" id="expExportDiv">
            <div class="content-wrap">
                <div class="wrapper" style="bottom: 50px;">
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/csm/expProvideApplication/searchProvideApplication')">查阅本库房所提申请</a>
                        </li>
                    </ul>
                    <section class="panel panel-default">
                        <div class="panel-body">
                            <div class="table-responsive no-border">
                                <div class="datatable-top">
                                    <div class="pull-left">
                                        <form:form id="searchForm" modelAttribute="expProvideApplication" onsubmit="return loadDivForm('mainCenterDiv','searchForm',
                                        '${ctx}/csm/expProvideApplication/searchProvideApplication');" method="post" class="form-inline">
                                            <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
                                            <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                                            <div class="form-group">
                                                <label class=" control-label">供货单位：</label>
                                                <form:select  path="storageOut" maxlength="64" class="form-control" data-parsley-required="true">
                                                    <from:option value="" label=""/>
                                                    <form:options items="${his_fns:getDeptSupplierList()}"  htmlEscape="false" itemLabel="storageName" itemValue="storageCode"/>
                                                </form:select>
                                            </div>&nbsp;&nbsp;
                                            <div class="form-group">
                                                <label class=" control-label">开始日期：</label>
                                                <form:input path="startDate" id ="startDate"  htmlEscape="false" class="form-control Wdate"
                                                            onfocus="WdatePicker({isShowClear:false,readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" data-parsley-required="true"/>
                                            </div>
                                            <div class="form-group">
                                                <label class=" control-label">结束日期：</label>
                                                <form:input path="stopDate" id ="stopDate"  htmlEscape="false" class="form-control Wdate"
                                                            onfocus="WdatePicker({isShowClear:false,readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss'})" data-parsley-required="true"/>
                                            </div>
                                            <div class="form-group">
                                                <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
                                            </div>
                                        </form:form>
                                    </div>
                                </div>
                                <table id="contentTable" class="table table-bordered table-striped mg-t datatable">
                                    <thead>
                                        <tr>
                                            <th hidden>jsonText</th>
                                            <th>编码</th>
                                            <th>名称</th>
                                            <th hidden>包装数量</th>
                                            <th>规格</th>
                                            <th>单位</th>
                                            <th hidden>最小规格</th>
                                            <th hidden>最小单位</th>
                                            <th>生产厂家</th>
                                            <th>申请数量</th>
                                            <th>审核数量</th>
                                            <th>已发数量</th>
                                            <th>发放状态</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <c:forEach items="${page.list}" var="expProvideApplication">
                                        <tr>
                                            <td> ${expProvideApplication.expCode}</td>
                                            <td> ${expProvideApplication.expName}</td>
                                            <td hidden> ${expProvideApplication.packageNum}</td>
                                            <td> ${expProvideApplication.packageSpec}</td>
                                            <td> ${fns:getDictLabel(expProvideApplication.packageUnits,'SPEC_UNIT','')}</td>
                                            <td hidden> ${expProvideApplication.minSpec}</td>
                                            <td hidden> ${fns:getDictLabel(expProvideApplication.minUnits,'SPEC_UNIT','')}</td>
                                            <td> ${his_fns:getExpSupplierById(expProvideApplication.firmId)}</td>
                                            <td> ${expProvideApplication.quantity}</td>
                                            <td> ${expProvideApplication.auditQuantity}</td>
                                            <td> ${expProvideApplication.quantityOut}</td>
                                            <td> ${fns:getDictLabel(expProvideApplication.outFlag,'OUT_FLAG_DICT','')}</td>
                                        </tr>
                                    </c:forEach>
                                </table>
                                <div class="pagination">${page}</div>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </section>
    </section>
</div>